using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ENTITIES;
using Utility;
using BUS;

public partial class admin_ChiTietKhachHang : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadData();

        }
    }

    private void LoadData()
    {
        try
        {
            int id = int.Parse(Request.QueryString["ID"]);            
            TBKhachHang khachhang = KhachHangBUS.GetByID(id);
            lit_MaKH.Text = khachhang.makh.ToString();
            lit_TenKH.Text = khachhang.tenkh;
            lit_TaiKhoan.Text = khachhang.taikhoan;
            lit_MatKhau.Text = khachhang.matkhau;
            Lit_SoDT.Text = khachhang.sodt;
            lit_Email.Text = khachhang.email;
            Lit_DiaChi.Text = khachhang.diachi;
        }
        catch
        {
            Response.Redirect("~/admin/DanhSachKhachHang.aspx");
        }
    }
}
